package com.xing.config;


import com.xing.constant.ResourceConstant;
import lombok.SneakyThrows;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

/**
 * @version 1.0
 * @Author Xing
 * @Date 2023/12/31 15:23
 */
@Component
public class SecurityResource {
    @Resource
    private ResourceConstant resourceConstant;
    @SneakyThrows
    public List<String> getPermitList(){
        System.out.println("sdd");
        String[] ignoringUrls = resourceConstant.getConstantList();
        List<String> propertiesList = getPropertiesList(ignoringUrls);
        return propertiesList;
    }
    private List<String> getPropertiesList(String[] arr){
        List<String> list = new ArrayList<String>();
        for (String s : arr) {
            list.add(s);
        }
        return list;
    }
}
